PatchROM v0.80
--------------

This file contains usage information for each of the supported commands.
For examples on how to get started with PatchROM, look at the tutorial 
at http://www.geocities.com/noprgress/patchrom/tutorial.html.

_______________

FONT/TILE DUMPING/INSERTING

patchrom <romfile> b <address> <bmpfile> [format]

   Dumps graphical data from <romfile> at <address> (256 tiles) to 
   <bmpfile>. Valid formats are:
      NES    (nes     8x8 2bpp)
      SNES2  (snes    8x8 2bpp)
      SNES   (snes    8x8 4bpp)
      GB1    (gameboy 8x8 1bpp)
      GB     (gameboy 8x8 2bpp)
      GEN    (genesis 8x8 4bpp)
      NGP    (neogeopocket 8x8 2bpp)
   If unspecified defaults to NES (.nes), SNES2 (.smc), GB (.gb), 
   GEN (.smd), or NGP (.ngp)


patchrom <romfile> f <address> <bmpfile> [format]

   Stores the graphical data for the font in <bmpfile> into <romfile>
   at <address>. If <format> is unspecified, it defaults to NES (.nes),
   SNES2 (.smc), GB (.gb), GEN (.smd), or NGP (.ngp) 

_______________

SCRIPT DUMPING/INSERTING

patchrom <thingyfile> c <fontfile>

   Converts a Thing table into a PatchROM font definition file


patchrom <romfile> l# <fontfile> "<string>"

   Locates a string within the ROM.  Uses the font definition data in 
   <fontfile> to encode the string and scans the ROM for the encoded 
   data. # is the font ID to use (1 if unspecified)


patchrom <romfile> d# <fontfile> <dumpfile> <address>* [count]

   Creates a script dump of <romfile> containing the string at <address>. 
   Attempts to locate pointer table and dump related information as well. 
   If <count> is specified, <count> strings are dumped. # is the font ID
   to use (1 if unspecified)


patchrom <romfile> x# <fontfile> <dumpfile> <address>* <size> <freq> [count]
  
   Creates a script dump of <romfile> using the pointer table at <address>.
   <size> is the number of bytes per pointer and <freq> is the number of
   strings between pointers.  If <count> is specified, <count> strings are
   dumped. # is the font ID to use (1 if unspecified)


patchrom <romfile> z# <fontfile> <dumpfile> <textaddress> <pointeraddress>* 
         <size> <freq> [count]
   
   Creates a script dump of <romfile> using the pointer table at 
   <pointeraddress>. <textaddress> is the first character of the first string
   pointer at by the pointer table. This is used when a constant is added to
   the pointer before it is dereferenced by the ROM. <size> is the number of 
   bytes per pointer and <freq> is the number of strings between pointers. 
   If <count> is specified, <count> strings are dumped. # is the font ID to 
   use (1 if unspecified)


patchrom <romfile> t# <textfile>

   Converts the text in <textfile> into the format specified by the file
   loaded within <textfile> and inserts it into <romfile>. # is the font
   ID to use (1 if unspecified)


* to specify broken pointer table addresses, use the format:
  <lowbyte_tableaddress>/<highbyte_tableaddress> or
  <lowbyte_tableaddress>/<highbyte_tableaddress>/<bankbyte_tableaddress>

_______________

MISCELLANEOUS FEATURES

patchrom <romfile> i <originalfile> [ipsfile]

   Create an IPS file which can be applied to originalfile to create romfile.
   If ipsfile is not specified, romfile.ips will be created.


patchrom <romfile> a <address> [variablefile]

   Decompiles <romfile> starting at <address>. The decompiler will continue
   until it reaches a rtl/rts. It will also decompile any code referenced by
   branching instructions, but not code referenced by jsr/jsl's. 
   If <variablefile> is specified, it will be processed for variable 
   definitions (see assembler.txt), and if the decompiler recognizes a
   variable, it will display the variable name rather than the address.


patchrom <romfile> p <patchfile>

   Applies patches from patchfile to romfile. 
   NOTE: This command can be used on PatchROM patch files (assembler code) or 
   IPS patchfiles.


patchrom <fontfile> o <textfile> [count]

   Processes <textfile> using the font defined in <fontfile> and calculates the
   most commonly used character pairs. It then weeds out overlapping character
   pairs in <textfile> to determine the best set of character pairs to use for
   DTE (dual-tile encoding) <textfile>. If <count> is specified, the best <count>
   character pairs are displayed. If not, all character pairs are displayed.


--------------------------------------------------------
Last updated: 12/09/2000 - Brian Weiss
For more information visit http://www.geocities.com/noprgress/patchrom.html
